package com.uphone.kingmall.adapter;

import android.content.Context;
import android.widget.ImageView;

import com.blankj.utilcode.util.SizeUtils;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.china.zhuoyue.R;
import com.uphone.kingmall.bean.FlashSalesListBean;
import com.uphone.kingmall.utils.GlideUtils;

/**
 * author : SuMeng
 * e-mail : 986335838@qq.com
 * time   : 2019/02/16
 * desc   : xxxx 描述
 */
public class HomeQiangGouAdapter extends BaseQuickAdapter<FlashSalesListBean.DataBean, BaseViewHolder> {

    public HomeQiangGouAdapter(Context context) {
        super(R.layout.kingmall_item_home_qianggou);
        this.mContext = context;
    }

    @Override
    protected void convert(final BaseViewHolder helper, final FlashSalesListBean.DataBean item) {
        helper.setText(R.id.tv_qianggou_name, "¥" + item.getGoodsPrice());
        ImageView iv_lawyer_icon = helper.getView(R.id.iv_qianggou);
        GlideUtils.getInstance().loadCornerImage(mContext, item.getGoodsMainImg(), SizeUtils.dp2px(2), iv_lawyer_icon);
    }
}